﻿#include <windows.h>
#include "../basiclib/String.h"
#include "../basiclib/camera.h"
#include "frame.h"

#include "../game/game.h"

int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in LPSTR lpCmdLine, __in int nShowCmd )
{
	//register msg
	//////////////////////////////////////////////////////////////////////////
	MsgController::Instance()->RegisterMsg( TGO::UIWndProc );
	MsgController::Instance()->RegisterMsg( TGO::CameraWndProc );
	MsgController::Instance()->RegisterMsg( TGO::GameWndProc);
	MsgController::Instance()->RegisterMsg( TGO::MainRoleWndProc );
	//////////////////////////////////////////////////////////////////////////


	RenderFrame mFrame;
	mFrame.RegisterInit( TGO::OnInit );
	mFrame.RegisterMainLoop( TGO::OnMainLoop );
	mFrame.RegisterUpdate( TGO::OnUpdate )  ;
	mFrame.RegisterRelease( TGO::OnRelease );

	mFrame.Init( hInstance, L"t2go" );
	mFrame.Run();
	return 0;
}